/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.evl.tecinfo.gui;

/**
 *
 * @author Tecinfo
 */
public class TelaGeral extends javax.swing.JFrame {

    public TelaLogin2 telaLogin;

    /**
     * Creates new form TelaGeral
     */
    public TelaGeral() {
        initComponents();

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jButton6 = new javax.swing.JButton();
        JButton_cadr_func = new javax.swing.JButton();
        JButton_cadr_cargo = new javax.swing.JButton();
        jButton_cadr_usuario = new javax.swing.JButton();
        jButton_cadr_area = new javax.swing.JButton();
        jButton_cadr_hr_extra = new javax.swing.JButton();
        jButton_cadr_form_pagamento = new javax.swing.JButton();
        jButton_Sair = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        JL_back = new javax.swing.JLabel();

        jButton6.setText("jButton6");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Início");
        setMinimumSize(new java.awt.Dimension(600, 600));
        setResizable(false);
        getContentPane().setLayout(null);

        JButton_cadr_func.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        JButton_cadr_func.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/icon_cadastr_funcio.png"))); // NOI18N
        JButton_cadr_func.setText("Cadastrar Funcionário");
        JButton_cadr_func.setToolTipText("Cadastrar novo funcionário");
        JButton_cadr_func.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        JButton_cadr_func.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JButton_cadr_funcActionPerformed(evt);
            }
        });
        getContentPane().add(JButton_cadr_func);
        JButton_cadr_func.setBounds(310, 220, 210, 60);

        JButton_cadr_cargo.setBackground(new java.awt.Color(255, 255, 255));
        JButton_cadr_cargo.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        JButton_cadr_cargo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/icon_cargo2.png"))); // NOI18N
        JButton_cadr_cargo.setText("Cadastrar cargo");
        JButton_cadr_cargo.setToolTipText("Cadastrar novo cargo");
        JButton_cadr_cargo.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        JButton_cadr_cargo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JButton_cadr_cargoActionPerformed(evt);
            }
        });
        getContentPane().add(JButton_cadr_cargo);
        JButton_cadr_cargo.setBounds(80, 380, 210, 60);

        jButton_cadr_usuario.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jButton_cadr_usuario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/icon_criar_usuario.png"))); // NOI18N
        jButton_cadr_usuario.setText("Criar usuário");
        jButton_cadr_usuario.setToolTipText("Criar novo usuário");
        jButton_cadr_usuario.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jButton_cadr_usuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_cadr_usuarioActionPerformed(evt);
            }
        });
        getContentPane().add(jButton_cadr_usuario);
        jButton_cadr_usuario.setBounds(80, 220, 210, 60);

        jButton_cadr_area.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jButton_cadr_area.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Icon_areat.png"))); // NOI18N
        jButton_cadr_area.setText("Cadastro area");
        jButton_cadr_area.setToolTipText("Cadastrar nova área");
        jButton_cadr_area.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jButton_cadr_area.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_cadr_areaActionPerformed(evt);
            }
        });
        getContentPane().add(jButton_cadr_area);
        jButton_cadr_area.setBounds(80, 300, 210, 60);

        jButton_cadr_hr_extra.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jButton_cadr_hr_extra.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/icon_hr_extra.png"))); // NOI18N
        jButton_cadr_hr_extra.setText("Registro Hora Extra");
        jButton_cadr_hr_extra.setToolTipText("Criar novo registro de hora extra");
        jButton_cadr_hr_extra.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jButton_cadr_hr_extra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_cadr_hr_extraActionPerformed(evt);
            }
        });
        getContentPane().add(jButton_cadr_hr_extra);
        jButton_cadr_hr_extra.setBounds(310, 300, 210, 60);

        jButton_cadr_form_pagamento.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jButton_cadr_form_pagamento.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/incon_pagamento.png"))); // NOI18N
        jButton_cadr_form_pagamento.setText("Cadastrar Forma Pag.");
        jButton_cadr_form_pagamento.setToolTipText("Cadastrar nova forma de pagamento");
        jButton_cadr_form_pagamento.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jButton_cadr_form_pagamento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_cadr_form_pagamentoActionPerformed(evt);
            }
        });
        getContentPane().add(jButton_cadr_form_pagamento);
        jButton_cadr_form_pagamento.setBounds(310, 380, 210, 60);

        jButton_Sair.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jButton_Sair.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Power-Button.png"))); // NOI18N
        jButton_Sair.setToolTipText("Sair :(");
        jButton_Sair.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jButton_Sair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_SairActionPerformed(evt);
            }
        });
        getContentPane().add(jButton_Sair);
        jButton_Sair.setBounds(480, 540, 80, 50);

        jLabel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 255, 255), new java.awt.Color(255, 255, 255), new java.awt.Color(255, 255, 255), new java.awt.Color(255, 255, 255)));
        getContentPane().add(jLabel2);
        jLabel2.setBounds(70, 180, 460, 290);

        jLabel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white));
        getContentPane().add(jLabel1);
        jLabel1.setBounds(60, 170, 480, 310);

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/logomarcav2.png"))); // NOI18N
        getContentPane().add(jLabel3);
        jLabel3.setBounds(240, 10, 120, 110);

        JL_back.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/back_azul.jpg"))); // NOI18N
        JL_back.setMaximumSize(new java.awt.Dimension(600, 600));
        getContentPane().add(JL_back);
        JL_back.setBounds(0, 0, 600, 600);

        setSize(new java.awt.Dimension(616, 638));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void jButton_cadr_areaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_cadr_areaActionPerformed

        telaLogin.telaArea.setVisible(true);

    }//GEN-LAST:event_jButton_cadr_areaActionPerformed

    private void JButton_cadr_cargoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JButton_cadr_cargoActionPerformed

        telaLogin.telaCargo.setVisible(true);

    }//GEN-LAST:event_JButton_cadr_cargoActionPerformed

    private void jButton_cadr_form_pagamentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_cadr_form_pagamentoActionPerformed

        telaLogin.telaPagamento.setVisible(true);

    }//GEN-LAST:event_jButton_cadr_form_pagamentoActionPerformed

    private void JButton_cadr_funcActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JButton_cadr_funcActionPerformed

        if (telaLogin.telaFuncionario.isVisible() == false) {
            telaLogin.telaFuncionario = new TelaCadastroFuncionario();
            telaLogin.telaFuncionario.setVisible(true);

        } else {
            telaLogin.telaFuncionario.setVisible(true);
        }

    }//GEN-LAST:event_JButton_cadr_funcActionPerformed

    private void jButton_cadr_hr_extraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_cadr_hr_extraActionPerformed

        if (telaLogin.telaHoraExtra.isVisible() == false) {
            telaLogin.telaHoraExtra = new TelaRegistroHoraExtra();
            telaLogin.telaHoraExtra.setVisible(true);

        } else {
            telaLogin.telaHoraExtra.setVisible(true);

        }

    }//GEN-LAST:event_jButton_cadr_hr_extraActionPerformed

    private void jButton_SairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_SairActionPerformed

        this.setVisible(false);

        TelaLogin2 telaLogin = new TelaLogin2();
        telaLogin.setVisible(true);

    }//GEN-LAST:event_jButton_SairActionPerformed

    private void jButton_cadr_usuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_cadr_usuarioActionPerformed

        if (telaLogin.telaUsuario.isVisible() == false) {
            telaLogin.telaUsuario = new TelaCadastroUsuario();
            telaLogin.telaUsuario.setVisible(true);

        } else {
            telaLogin.telaUsuario.setVisible(true);
        }

    }//GEN-LAST:event_jButton_cadr_usuarioActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton JButton_cadr_cargo;
    private javax.swing.JButton JButton_cadr_func;
    private javax.swing.JLabel JL_back;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton_Sair;
    private javax.swing.JButton jButton_cadr_area;
    private javax.swing.JButton jButton_cadr_form_pagamento;
    private javax.swing.JButton jButton_cadr_hr_extra;
    private javax.swing.JButton jButton_cadr_usuario;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    // End of variables declaration//GEN-END:variables
}
